package com.aspose.cells;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

final class zic {
   private static int a = 10;
   private static int b = 8;
   private static int c = 3;

   static void a(zig var0) throws Exception {
      zn var1 = var0.ap();
      zbcs var2 = var0.z();
      if (var0.z().getCount() != 0 && zia.a(var0.z().i()) != 0) {
         if (var0.A().a().getCount() > 0) {
            var0.z().b = true;
         }

         if (var0.A().b().getCount() > 0) {
            var0.z().c = true;
         }

         var0.z().a(zia.a(var0.z().a()));
         var0.z().b(zia.a(var0.z().b()));
         var0.z().a(zia.b(var0.z().a()));
         var0.z().b(zia.b(var0.z().b()));
         String var3 = zia.c(var0);
         if (!"".equals(var3)) {
            throw new IllegalArgumentException(var3);
         } else {
            f(var0);
            zia.e(var0);
            h(var0);
            zjl.a(var0.e(), var0.G(), var0.z(), var0.z().c(0));
            boolean var4 = zia.a(var0.N());
            boolean var5 = zvr.a(var0);
            zbcq var6 = (zbcq)((zbcq)var0.z().j().get(0));
            if (var4) {
               if (var0.p() < 0) {
                  var0.f(0);
               }

               if (var0.p() > 44) {
                  var0.f(44);
               }

               if (var0.E() < 0) {
                  var0.h(0);
               }

               if (var0.E() > 44) {
                  var0.h(44);
               }
            }

            if (!var5) {
               var0.K().S().a("");
               var0.K().d(false);
            }

            com.aspose.cells.b.a.b.zp var7 = new com.aspose.cells.b.a.b.zp(a + var0.ak().c(), a + var0.ak().d(), var0.ak().e() - a * 2, var0.ak().f() - a * 2);
            if (var0.M().l()) {
               com.aspose.cells.b.a.b.zt var8 = new com.aspose.cells.b.a.b.zt((float)var7.e() * 0.8F, (float)var7.f() * 0.8F);
               com.aspose.cells.b.a.b.zs var9 = var0.M().a(var8);
               var0.M().e().b.a((var0.ak().e() - var9.b()) / 2);
               var0.M().e().b.b(a);
               var0.M().e().b.a(var9);
               var7.b(var7.d() + var9.c() + b);
               var7.d(var7.f() - (var9.c() + b));
            }

            boolean var42 = zald.a(var0);
            var0.x().b = var42;
            zia.d(var0);
            com.aspose.cells.b.a.b.zp[] var10;
            if (var0.v()) {
               if (var0.N() != 48 && var0.N() != 45 && !var42) {
                  zia.g(var0);
                  com.aspose.cells.b.a.b.zp[] var44 = new com.aspose.cells.b.a.b.zp[]{var7};
                  zald.a(var1, var0.x(), var44);
                  var7 = var44[0];
               } else {
                  zbcq var43 = (zbcq)((zbcq)var0.z().j().get(0));
                  zia.a(var0, var43);
                  var10 = new com.aspose.cells.b.a.b.zp[]{var7};
                  zald.a(var1, var0.x(), var43, var10);
                  var7 = var10[0];
               }
            }

            zvr.a(var0, var7, var4);
            com.aspose.cells.b.a.b.zp var45 = new com.aspose.cells.b.a.b.zp(var7.c(), var7.d(), var7.e(), var7.f());
            if (var0.e().S().l() && var0.e().q()) {
               var10 = new com.aspose.cells.b.a.b.zp[]{var7};
               a(var1, var0.e(), var45, var10, var4);
               var7 = var10[0];
            }

            if (var0.G().S().l() && var0.G().q()) {
               var10 = new com.aspose.cells.b.a.b.zp[]{var7};
               a(var1, var0.G(), var45, var10, var4);
               var7 = var10[0];
            }

            com.aspose.cells.b.a.b.zp var46 = new com.aspose.cells.b.a.b.zp(var7.c(), var7.d(), var7.e(), var7.f());
            com.aspose.cells.b.a.b.zp[] var11 = new com.aspose.cells.b.a.b.zp[]{var7};
            zaua.a(var0, var11, var6);
            var7 = var11[0];
            var0.B().b = new com.aspose.cells.b.a.b.zp(var7.c(), var7.d(), var7.e(), var7.f());
            if (!var0.B().s()) {
               if (var0.B().l() + var0.B().i() > 4000) {
                  var0.B().a(4000 - var0.B().i());
               }

               if (var0.B().m() + var0.B().n() > 4000) {
                  var0.B().b(4000 - var0.B().n());
               }

               var7.a(var0.B().v());
               var7.b(var0.B().w());
               var7.c(var0.B().t());
               var7.d(var0.B().u());
               if (var7.i() > var0.a()) {
                  var7.c(var0.a() - var7.c());
               }

               if (var7.j() > var0.b()) {
                  var7.d(var0.b() - var7.d());
               }
            }

            var0.B().b = new com.aspose.cells.b.a.b.zp(var7.c(), var7.d(), var7.e(), var7.f());
            double var47 = 0.0D;
            double var13 = 0.0D;
            double[] var15 = new double[]{var47};
            double[] var16 = new double[]{var13};
            boolean var17 = zia.a(var2.i(), var15, var16, var0.G());
            var47 = var15[0];
            var13 = var16[0];
            boolean var18 = var0.G().O();
            boolean var19 = var0.G().P();
            boolean var20 = var0.G().N();
            boolean var21 = var0.G().M();
            zia.a(var1, var0.G(), var13, var47, var17, var0.G().l, var0.N(), var7, var4, var2.c(0));
            zia.a(var1, var0.e(), var0.e().l, var7, var0.N(), var2, var4);
            if (var5) {
               g(var0);
            }

            if (!zbuk.a(var7)) {
               var7.a(var7.c() + c);
               var7.b(var7.d() + c);
               var7.c(var7.e() - 2 * c);
               var7.d(var7.f() - 2 * c);
               zvr.a(var0, var7, var4);
            }

            zbr.a(var0);
            if (var5 && var0.K().S().l() && var0.K().q()) {
               com.aspose.cells.b.a.b.zp[] var26 = new com.aspose.cells.b.a.b.zp[]{var7};
               a(var1, var0.K(), var26);
               var7 = var26[0];
            }

            boolean var48 = false;
            int var27 = var0.E() / 45;
            int var30;
            if (!zbuk.a(var7) && var0.u()) {
               zia.f(var0);
               com.aspose.cells.b.a.b.zs var28 = zis.a(var1, var0.k());
               var0.k().a(var28);
               int var29 = zis.a(var1, var0.k(), var7);
               var0.k().a(var29);
               var30 = var28.c() + var29;
               var0.k().a.d(var30);
               com.aspose.cells.b.a.b.zo[] var31 = c(var0);
               if (var0.p() > 0 && !var4) {
                  switch(var27) {
                  case 0:
                  case 3:
                  case 4:
                  case 7:
                  case 8:
                     if (!var0.B().s() && var0.D()) {
                        var7.d(var7.f() + var30 + c);
                        var7.a(var7.c() - var28.b());
                        var7.c(var7.e() + var28.b());
                     } else {
                        var7.d(var7.f() - (var30 + c));
                        var7.a(var7.c() + var28.b());
                        var7.c(var7.e() - var28.b());
                     }

                     var0.e().j(3);
                     var0.e().f(2);
                     var0.e().h(2);
                     break;
                  case 1:
                  case 2:
                  case 5:
                  case 6:
                     if (!var0.B().s() && var0.D()) {
                        var0.k().a.a(var7.c() + var28.b());
                        var0.k().a.b(var7.j());
                        var0.k().a.c(var7.e() - var28.b());
                        var7.d(var7.f() + var30);
                     } else {
                        var7.d(var7.f() - var30);
                        var0.k().a.a(var7.c() + var28.b());
                        var0.k().a.b(var7.j());
                        var0.k().a.c(var7.e() - var28.b());
                     }
                  }
               } else if (!var0.B().s() && var0.D()) {
                  var0.k().a.a(var7.c() + var28.b());
                  var0.k().a.b(var7.j());
                  var0.k().a.c(var7.e() - var28.b());
                  var7.d(var7.f() + var30);
               } else {
                  var7.d(var7.f() - var30);
                  var0.k().a.a(var7.c() + var28.b());
                  var0.k().a.b(var7.j());
                  var0.k().a.c(var7.e() - var28.b());
               }

               if (var0.B().s() || !var0.D()) {
                  zvr.a(var0, var7, var4);
               }
            }

            int var49 = var0.z().h();
            com.aspose.cells.b.a.b.zs var50 = zbr.a(var1, var0.K(), var0.K().l, var7);
            var30 = var0.K().J().c() * var0.ak().f() / 4000;
            com.aspose.cells.b.a.b.zo[] var32;
            int var35;
            int var37;
            int var38;
            com.aspose.cells.b.a.b.zs var51;
            if (!zbuk.a(var7) && var0.K().I() != 3 && var0.K().q() && !var4) {
               var51 = new com.aspose.cells.b.a.b.zs(0, 0);
               if (var0.K().q()) {
                  var51 = var0.K().S().e().b.b();
               }

               if (!var4) {
                  var32 = d(var0);
                  byte var33 = 0;
                  if (var32[0].e() < var32[1].e()) {
                     var33 = 1;
                  }

                  float var34 = Math.abs((var32[1].e() - var32[0].e()) / (float)var0.K().l.size());
                  var35 = var50.c() + var30;
                  if (var0.p() > 0) {
                     if (var32[0].e() == var32[1].e()) {
                        if (var7.j() - var51.c() - (int)var32[0].e() < var35) {
                           if (!var0.B().s() && var0.D()) {
                              var7.d(var7.f() + (var35 - (var7.j() - var51.c() - (int)var32[0].e())));
                           } else {
                              var7.d(var7.f() - (var35 - (var7.j() - var51.c() - (int)var32[0].e())));
                           }
                        }
                     } else {
                        if (var0.e().I() != 3) {
                           var50.a(var50.b() + var30);
                        }

                        var37 = var51.b() + a(var0, var50);
                        switch(var27) {
                        case 0:
                        case 4:
                        case 8:
                           if (var7.i() - (int)Math.abs(var32[0].d() + var32[1].d()) / 2 < var37) {
                              var38 = var37 - (var7.i() - (int)Math.abs(var32[0].d() + var32[1].d()) / 2);
                              if (!var0.B().s() && var0.D()) {
                                 var7.c(var7.e() + var38);
                              } else {
                                 var7.c(var7.e() - var38);
                              }
                           }
                        case 1:
                        case 2:
                        case 5:
                        case 6:
                        default:
                           break;
                        case 3:
                        case 7:
                           if ((int)Math.abs(var32[0].d() + var32[1].d()) / 2 - var7.c() < var37) {
                              var38 = var37 - ((int)Math.abs(var32[0].d() + var32[1].d()) / 2 - var7.c());
                              if (!var0.B().s() && var0.D()) {
                                 var7.a(var7.c() - var38);
                                 var7.c(var7.e() + var38);
                              } else {
                                 var7.a(var7.c() + var38);
                                 var7.c(var7.e() - var38);
                              }
                           }
                        }

                        float var65 = var34 * (float)Math.sin((double)var0.p() * 3.141592653589793D / 180.0D);
                        if ((int)((float)var7.j() - var32[var33].e() + var65) < var50.c()) {
                           if (!var0.B().s() && var0.D()) {
                              var7.d(var7.f() + var50.c() - (int)((float)var7.j() - var32[var33].e() + var65));
                           } else {
                              var7.d(var7.f() - (var50.c() - (int)((float)var7.j() - var32[var33].e() + var65)));
                           }
                        }
                     }
                  }
               }

               if (var0.B().s() || !var0.D()) {
                  zvr.a(var0, var7, false);
               }
            }

            var51 = zbr.a(var1, var0.G(), var2.c(0), var4);
            int var54;
            int var55;
            if (!zbuk.a(var7) && var0.G().I() != 3 && var0.G().q()) {
               if (var4) {
                  var32 = c(var0);
                  var54 = var51.c();
                  if (var7.j() - (int)var32[0].e() < var54) {
                     if (!var0.B().s() && var0.D()) {
                        var7.d(var7.f() + (var54 - (var7.j() - (int)var32[0].e())));
                     } else {
                        var7.d(var7.f() - (var54 - (var7.j() - (int)var32[0].e())));
                     }
                  }
               } else {
                  com.aspose.cells.b.a.b.zo var52 = e(var0);
                  if (var52.d() < var0.S().j()) {
                     var54 = (int)(var52.d() - (float)var7.c());
                     if (!var48) {
                        var54 -= var0.G().S().e().b.b().b();
                     }

                     var55 = var51.b();
                     if (var0.u()) {
                        var55 -= var0.k().k().b();
                     }

                     if (var54 < var55) {
                        if (!var0.B().s() && var0.D()) {
                           var7.a(var7.c() - var55);
                           var7.c(var7.e() + var55);
                        } else {
                           var7.a(var7.c() + var55);
                           var7.c(var7.e() - var55);
                        }
                     }
                  } else {
                     var54 = (int)((float)var7.i() - var52.d());
                     if (var54 < var51.b()) {
                        if (!var0.B().s() && var0.D()) {
                           var7.c(var7.e() + var51.b());
                        } else {
                           var7.c(var7.e() - var51.b());
                        }
                     }
                  }

                  if (var0.p() >= 0) {
                     switch(var27) {
                     case 1:
                     case 2:
                     case 5:
                     case 6:
                        if ((float)var7.j() - var52.e() < (float)(var51.c() / 2)) {
                           if (!var0.B().s() && var0.D()) {
                              var7.d(var7.f() + var51.c() / 2);
                           } else {
                              var7.d(var7.f() - var51.c() / 2);
                           }
                        }
                     case 3:
                     case 4:
                     }
                  } else {
                     if (var52.e() - var0.S().i() - (float)var7.d() < (float)(var51.c() / 2)) {
                        if (!var0.B().s() && var0.D()) {
                           var7.b(var7.d() - var51.c() / 2);
                        } else {
                           var7.b(var7.d() + var51.c() / 2);
                        }
                     }

                     if (!var0.B().s() && var0.D()) {
                        var7.d(var7.f() + var51.c() / 2);
                     } else {
                        var7.d(var7.f() - var51.c() / 2);
                     }
                  }
               }

               if (var0.B().s() || !var0.D()) {
                  zvr.a(var0, var7, var4);
               }
            }

            com.aspose.cells.b.a.b.zs var53 = zbr.a(var1, var0.e(), var7, var46, var49, var4, var2.c(0));
            var54 = (int)((double)(var0.e().J().k() + var0.e().aa() + var0.e().ab()) + 0.5D);
            if (var0.z().e() != null) {
               var54 += var54 * var0.z().e().length;
            }

            com.aspose.cells.b.a.b.zo[] var58;
            if (!zbuk.a(var7) && var0.e().I() != 3 && var0.e().q()) {
               com.aspose.cells.b.a.b.zs var56 = new com.aspose.cells.b.a.b.zs(0, 0);
               if (var0.e().S().l()) {
                  var56 = var0.e().S().e().b.b();
               }

               if (!var4) {
                  var58 = c(var0);
                  byte var59 = 0;
                  if (var58[0].e() < var58[1].e()) {
                     var59 = 1;
                  }

                  float var63 = Math.abs((var58[1].e() - var58[0].e()) / (float)var49);
                  var38 = var53.c() + var54;
                  if (var0.p() >= 0) {
                     if (var58[0].e() == var58[1].e()) {
                        if (var7.j() - var56.c() - (int)var58[0].e() < var38) {
                           if (!var0.B().s() && var0.D()) {
                              var7.d(var7.f() + (var38 - (var7.j() - var56.c() - (int)var58[0].e())));
                           } else {
                              var7.d(var7.f() - (var38 - (var7.j() - var56.c() - (int)var58[0].e())));
                           }
                        }
                     } else {
                        if (var0.e().I() != 3) {
                           var53.a(var53.b() + var54);
                        }

                        int var40 = var56.b() + a(var0, var53);
                        int var41;
                        switch(var27) {
                        case 1:
                        case 5:
                           if ((int)Math.abs(var58[0].d() + var58[1].d()) / 2 - var7.c() < var40) {
                              var41 = var40 - ((int)Math.abs(var58[0].d() + var58[1].d()) / 2 - var7.c());
                              if (!var0.B().s() && var0.D()) {
                                 var7.a(var7.c() - var41);
                                 var7.c(var7.e() + var41);
                              } else {
                                 var7.a(var7.c() + var41);
                                 var7.c(var7.e() - var41);
                              }
                           }
                           break;
                        case 2:
                        case 6:
                           if (var7.i() - (int)Math.abs(var58[0].d() + var58[1].d()) / 2 < var40) {
                              var41 = var40 - (var7.i() - (int)Math.abs(var58[0].d() + var58[1].d()) / 2);
                              if (!var0.B().s() && var0.D()) {
                                 var7.c(var7.e() + var41);
                              } else {
                                 var7.c(var7.e() - var41);
                              }
                           }
                        case 3:
                        case 4:
                        }

                        float var66 = var63 * (float)Math.sin((double)var0.p() * 3.141592653589793D / 180.0D);
                        if ((int)((float)var7.j() - var58[var59].e() + var66) < var53.c()) {
                           if (!var0.B().s() && var0.D()) {
                              var7.d(var7.f() + (var53.c() - (int)((float)var7.j() - var58[var59].e() + var66)));
                           } else {
                              var7.d(var7.f() - (var53.c() - (int)((float)var7.j() - var58[var59].e() + var66)));
                           }
                        }
                     }
                  }
               } else {
                  com.aspose.cells.b.a.b.zo var57 = e(var0);
                  int var36 = var53.b() + var54;
                  var37 = (int)(var57.d() - (float)var7.c());
                  if (var37 < var36) {
                     if (!var0.B().s() && var0.D()) {
                        var7.a(var7.c() - var36);
                        var7.c(var7.e() + var36);
                     } else {
                        var7.a(var7.c() + var36);
                        var7.c(var7.e() - var36);
                     }
                  }
               }

               if (var0.B().s() || !var0.D()) {
                  zvr.a(var0, var7, var4);
               }
            }

            if (!zbuk.a(var7) && var0.u()) {
               var55 = zis.a(var1, var0.k(), var7);
               if (var55 > var0.k().l()) {
                  var0.k().a(var55);
                  var35 = var55 - var0.k().l();
                  var0.k().a.d(var0.k().a.f() + var35);
                  com.aspose.cells.b.a.b.zo[] var61 = c(var0);
                  if (var0.p() > 0 && !var4) {
                     switch(var27) {
                     case 0:
                     case 3:
                     case 4:
                     case 7:
                     case 8:
                        if (!var0.B().s() && var0.D()) {
                           var7.d(var7.f() + var35 + c);
                        } else {
                           var7.d(var7.f() - (var35 + c));
                        }

                        var0.e().j(3);
                        var0.e().f(2);
                        var0.e().h(2);
                        break;
                     case 1:
                     case 2:
                     case 5:
                     case 6:
                        if (!var0.B().s() && var0.D()) {
                           var0.k().a.b(var0.k().a.d() + var35);
                           var7.d(var7.f() + var35);
                        } else {
                           var7.d(var7.f() - var35);
                           var0.k().a.b(var0.k().a.d() - var35);
                        }
                     }
                  } else if (!var0.B().s() && var0.D()) {
                     var0.k().a.b(var0.k().a.d() + var35);
                     var7.d(var7.f() + var35);
                  } else {
                     var7.d(var7.f() - var35);
                     var0.k().a.b(var0.k().a.d() - var35);
                  }

                  if (var0.B().s() || !var0.D()) {
                     zvr.a(var0, var7, var4);
                  }
               }
            }

            if (var0.G().q()) {
               var55 = zia.a(var1, var0.G(), var4, var0.z().c(0), var7);
               boolean var60 = false;
               if (var4) {
                  var35 = zbuk.a((double)var0.S().g());
               } else {
                  var35 = zbuk.a((double)var0.S().i());
               }

               if (var18 && var0.G().l.size() > 3 && var55 > var35 && var35 != 0) {
                  var0.G().l.clear();
                  var0.G().i(var18);
                  var0.G().j(var19);
                  var0.G().h(var20);
                  var0.G().g(var21);
                  zia.a(var1, var0.G(), var13, var47, var17, var0.G().l, var0.z().c(0).ah(), var7, var4, var0.z().c(0));
               }
            }

            if (!var0.B().s() && var0.D() && var0.N() != 45 && var0.N() != 48) {
               com.aspose.cells.b.a.b.zp var62 = new com.aspose.cells.b.a.b.zp(var7.c(), var7.d(), var7.e(), var7.f());
               var7 = new com.aspose.cells.b.a.b.zp(var0.B().b.c(), var0.B().b.d(), var0.B().b.e(), var0.B().b.f());
               var0.B().b = new com.aspose.cells.b.a.b.zp(var62.c(), var62.d(), var62.e(), var62.f());
            }

            if (var0.e().S().l() && var0.e().q()) {
               a(var0.e(), var7, var4, var51, var53, var54);
            }

            if (var0.G().S().l() && var0.G().q()) {
               a(var0.G(), var7, var4, var51, var53, var54);
            }

            if (var0.K().S().l() && var0.K().q()) {
               if (var0.K().I() != 3) {
                  var50.a(var50.b() + var30);
               }

               var58 = d(var0);
               if (var58[0].e() == var58[1].e()) {
                  if (var0.p() >= 0) {
                     var0.K().S().e().b.a((int)((var58[0].d() + var58[1].d()) / 2.0F - (float)(var0.K().S().e().b.e() / 2)));
                  }
               } else {
                  if (var58[0].d() >= var58[1].d()) {
                     var58[1].d();
                  } else {
                     var58[0].d();
                  }

                  if (var58[0].d() >= var58[1].d()) {
                     var58[0].d();
                  } else {
                     var58[1].d();
                  }

                  switch(var27) {
                  case 0:
                  case 4:
                  case 8:
                     var0.K().S().e().b.a((int)(Math.abs(var58[0].d() + var58[1].d()) / 2.0F + (float)a(var0, var50)));
                  case 1:
                  case 2:
                  case 5:
                  case 6:
                  default:
                     break;
                  case 3:
                  case 7:
                     var0.K().S().e().b.a((int)(Math.abs(var58[0].d() + var58[1].d()) / 2.0F - (float)var0.K().S().e().b.e() - (float)a(var0, var50)));
                  }

                  var0.K().S().e().b.b((int)(Math.abs(var58[0].e() + var58[1].e()) / 2.0F));
               }
            }

            if (var0.u() && !var4) {
               com.aspose.cells.b.a.b.zo[] var64 = c(var0);
               if (var0.p() > 0) {
                  switch(var27) {
                  case 0:
                  case 3:
                  case 4:
                  case 7:
                  case 8:
                     var35 = var64[0].d() < var64[1].d() ? 0 : 1;
                     var0.k().a.a((int)var64[var35].d());
                     var0.k().a.b((int)var64[var35].e());
                     var0.k().a.c((int)Math.abs(var64[1].d() - var64[0].d()));
                  case 1:
                  case 2:
                  case 5:
                  case 6:
                  }
               }
            }

         }
      }
   }

   static void b(zig var0) throws Exception {
      a(var0);
      zn var1 = var0.ap();
      int var2 = var0.ap().j();
      zbcs var3 = var0.z();
      if (var0.z().getCount() != 0 && zia.a(var0.z().i()) != 0) {
         boolean var4 = zia.a(var0.N());
         boolean var5 = var0.B().E();
         int var6 = var0.z().h();
         float var7 = zia.a(var0.G(), var0.S().e(), var0.S().g(), var4);
         double var8 = var0.G().s();
         float var10 = zia.a(var0.G(), var0.S().f() - var0.S().i(), var0.S().i(), var4);
         zia.a(var0.e(), var0.S().f() - var0.S().i(), var0.S().i(), var4, var0.z());
         zia.a(var0.e(), var0.S().e(), var0.S().g(), var4, var0.z());
         var0.B().G();
         com.aspose.cells.b.a.b.zp var13 = var0.B().a;
         zvr.a(var1, var0, var4);
         ArrayList var14 = new ArrayList();
         ArrayList var15 = new ArrayList();
         zbcq var16 = (zbcq)((zbcq)var0.z().j().get(0));
         if (!var5) {
            switch(var0.N()) {
            case 3:
               ArrayList var25 = zav.a(var1, var0, var10, var8, var6);
               com.aspose.cells.b.a.a.ze.a(var14, (Collection)var25);
               break;
            case 4:
               ArrayList var26 = zav.a(var1, var0, var10, var8, var6, false);
               com.aspose.cells.b.a.a.ze.a(var14, (Collection)var26);
               break;
            case 5:
               ArrayList var27 = zav.a(var1, var0, var10, var8, var6, true);
               com.aspose.cells.b.a.a.ze.a(var14, (Collection)var27);
            case 6:
            case 7:
            case 8:
            case 12:
            case 13:
            case 14:
            case 15:
            case 16:
            case 35:
            case 36:
            case 37:
            case 38:
            case 39:
            case 40:
            case 41:
            case 42:
            case 44:
            case 46:
            case 47:
            case 49:
            default:
               break;
            case 9:
            case 24:
            case 31:
            case 53:
               ArrayList var21 = zcf.a(var1, var0, var7, var8, var6);
               com.aspose.cells.b.a.a.ze.a(var15, (Collection)var21);
               break;
            case 10:
            case 25:
            case 32:
            case 54:
               ArrayList var22 = zcf.a(var1, var0, var8, var6);
               com.aspose.cells.b.a.a.ze.a(var15, (Collection)var22);
               break;
            case 11:
            case 26:
            case 33:
            case 55:
               ArrayList var23 = zcf.b(var1, var0, var8, var6);
               com.aspose.cells.b.a.a.ze.a(var15, (Collection)var23);
               break;
            case 17:
            case 27:
            case 34:
            case 56:
               ArrayList var17 = zkr.b(var1, var0, var10, var8, var6);
               com.aspose.cells.b.a.a.ze.a(var14, (Collection)var17);
               break;
            case 18:
            case 21:
            case 28:
            case 50:
               ArrayList var18 = zkr.a(var1, var0, var10, var8, var6);
               com.aspose.cells.b.a.a.ze.a(var14, (Collection)var18);
               break;
            case 19:
            case 22:
            case 29:
            case 51:
               ArrayList var19 = zkr.a(var1, var0, var8, var6);
               com.aspose.cells.b.a.a.ze.a(var14, (Collection)var19);
               break;
            case 20:
            case 23:
            case 30:
            case 52:
               ArrayList var20 = zkr.b(var1, var0, var8, var6);
               com.aspose.cells.b.a.a.ze.a(var14, (Collection)var20);
               break;
            case 43:
               ArrayList var24 = zkr.c(var1, var0, var10, var8, var6);
               com.aspose.cells.b.a.a.ze.a(var14, (Collection)var24);
               break;
            case 45:
            case 48:
               zaua.a(var1, var0);
            }
         }

         zkr.c(var1, var0, var14);
         zcf.a(var1, var0, var15);
         if (var0.i().c().i() && var0.B().c().i() && var0.ap().j() != 4) {
            var0.ap().b(4);
         }

         if (var0.G().q()) {
            if (var4) {
               zbr.b(var1, var0.G());
            } else {
               zbr.a(var1, var0.G());
            }
         }

         if (var0.e().q()) {
            if (var4) {
               zbr.a(var1, var0.e(), var6, var13);
            } else {
               zbr.a(var1, var0.e(), var6, var13, var4);
            }
         }

         if (var0.K().q()) {
            zbr.c(var1, var0.K());
         }

         if (var0.i().c().i() && var0.B().c().i() && var0.ap().j() != var2) {
            var0.ap().b(var2);
         }

         if (var0.G().S().l() && var0.G().q()) {
            a(var0, var1, var0.G());
         }

         if (var0.e().S().l() && var0.e().q()) {
            a(var0, var1, var0.e());
         }

         if (var0.K().S().l() && var0.K().q()) {
            a(var0, var1, var0.K());
         }

         if (var0.M().l()) {
            var0.M().m();
         }

         if (var0.u()) {
            zis.a(var1, var0.k(), var0.k().a.c(), var0.k().a.d(), var0.k().a.e(), var4);
         }

         if (var0.v()) {
            if (var0.i().c().i() && var0.x().c().c().i() && var0.ap().j() != 4) {
               var0.ap().b(4);
            }

            if (var0.N() != 48 && var0.N() != 45 && !var0.x().b) {
               zald.a(var1, var0.x(), var4, var16);
            } else {
               zald.a(var1, var0.x(), var16);
            }

            if (var0.i().c().i() && var0.x().c().c().i() && var0.ap().j() != var2) {
               var0.ap().b(var2);
            }
         }

      }
   }

   private static void f(zig var0) {
      switch(var0.N()) {
      case 45:
      case 48:
         Iterator var1 = var0.z().iterator();

         while(var1.hasNext()) {
            zbcq var2 = (zbcq)var1.next();
            if (var2.J()) {
               var2.c(true);
            }

            var0.c(false);
            var0.e().d(false);
            var0.e().S().a("");
            var0.G().d(false);
            var0.G().S().a("");
            var0.e().w().a(0);
            var0.e().A().a(0);
            var0.G().w().a(0);
            var0.G().A().a(0);
         }

         if (var0.p() < 1) {
            var0.f(1);
         }

         if (var0.p() > 90) {
            var0.f(90);
         }
      default:
      }
   }

   static com.aspose.cells.b.a.b.zo[] c(zig var0) {
      com.aspose.cells.b.a.b.zo var1 = new com.aspose.cells.b.a.b.zo(var0.S().j(), var0.S().f());
      int var2 = var0.E() % 90;
      if (var2 >= 45) {
         var2 = 90 - var2;
      }

      int var5 = var0.E() / 45;
      float var3;
      float var4;
      switch(var5) {
      case 0:
      case 3:
      case 4:
      case 7:
      case 8:
         var3 = var0.S().g();
         var4 = var0.S().h();
         break;
      case 1:
      case 2:
      case 5:
      case 6:
      default:
         var3 = var0.S().h();
         var4 = var0.S().g();
      }

      float var6 = var4 * (float)Math.sin((double)var2 * 3.141592653589793D / 180.0D);
      float var7 = var4 * (float)Math.sin((double)var0.p() * 3.141592653589793D / 180.0D);
      com.aspose.cells.b.a.b.zo[] var8 = new com.aspose.cells.b.a.b.zo[4];
      com.aspose.cells.b.a.b.zo[] var9 = new com.aspose.cells.b.a.b.zo[4];
      zbuk.a(var8);
      zbuk.a(var9);
      switch(var5) {
      case 0:
      case 8:
         var8[0].a(var1.d() - (var3 + var6) / 2.0F);
         var8[1].a(var8[0].d() + var3);
         var8[2].a(var8[1].d() + var6);
         var8[3].a(var8[0].d() + var6);
         var8[0].b(var1.e() + var7 / 2.0F);
         var8[1].b(var8[0].e());
         var8[2].b(var8[1].e() - var7);
         var8[3].b(var8[2].e());
         var9[0] = var8[0];
         var9[1] = var8[1];
         var9[2] = var8[3];
         var9[3] = var8[2];
         break;
      case 1:
         var8[0].a(var1.d() - (var3 + var6) / 2.0F);
         var8[1].a(var8[0].d() + var6);
         var8[2].a(var8[1].d() + var3);
         var8[3].a(var8[0].d() + var3);
         var8[0].b(var1.e() - var7 / 2.0F);
         var8[1].b(var8[0].e() + var7);
         var8[2].b(var8[1].e());
         var8[3].b(var8[0].e());
         var9[0] = var8[0];
         var9[1] = var8[1];
         var9[2] = var8[3];
         var9[3] = var8[2];
         break;
      case 2:
         var8[1].a(var1.d() - (var3 + var6) / 2.0F);
         var8[0].a(var8[1].d() + var6);
         var8[2].a(var8[1].d() + var3);
         var8[3].a(var8[0].d() + var3);
         var8[0].b(var1.e() - var7 / 2.0F);
         var8[1].b(var8[0].e() + var7);
         var8[2].b(var8[1].e());
         var8[3].b(var8[0].e());
         var9[0] = var8[3];
         var9[1] = var8[2];
         var9[2] = var8[0];
         var9[3] = var8[1];
         break;
      case 3:
         var8[1].a(var1.d() - (var3 + var6) / 2.0F);
         var8[0].a(var8[1].d() + var3);
         var8[2].a(var8[1].d() + var6);
         var8[3].a(var8[2].d() + var3);
         var8[0].b(var1.e() - var7 / 2.0F);
         var8[1].b(var8[0].e());
         var8[2].b(var8[1].e() + var7);
         var8[3].b(var8[2].e());
         var9[0] = var8[3];
         var9[1] = var8[2];
         var9[2] = var8[0];
         var9[3] = var8[1];
         break;
      case 4:
         var8[0].a(var1.d() + (var3 + var6) / 2.0F);
         var8[1].a(var8[0].d() - var3);
         var8[2].a(var8[1].d() - var6);
         var8[3].a(var8[2].d() + var3);
         var8[0].b(var1.e() - var7 / 2.0F);
         var8[1].b(var8[0].e());
         var8[2].b(var8[1].e() + var7);
         var8[3].b(var8[2].e());
         var9[0] = var8[3];
         var9[1] = var8[2];
         var9[2] = var8[0];
         var9[3] = var8[1];
         break;
      case 5:
         var8[0].a(var1.d() + (var3 + var6) / 2.0F);
         var8[1].a(var8[0].d() - var6);
         var8[2].a(var8[1].d() - var3);
         var8[3].a(var8[0].d() - var3);
         var8[0].b(var1.e() + var7 / 2.0F);
         var8[1].b(var8[0].e() - var7);
         var8[2].b(var8[1].e());
         var8[3].b(var8[0].e());
         var9[0] = var8[3];
         var9[1] = var8[2];
         var9[2] = var8[0];
         var9[3] = var8[1];
         break;
      case 6:
         var8[1].a(var1.d() + (var3 + var6) / 2.0F);
         var8[0].a(var8[1].d() - var6);
         var8[2].a(var8[1].d() - var3);
         var8[3].a(var8[0].d() - var3);
         var8[0].b(var1.e() + var7 / 2.0F);
         var8[1].b(var8[0].e() - var7);
         var8[2].b(var8[1].e());
         var8[3].b(var8[0].e());
         var9[0] = var8[0];
         var9[1] = var8[1];
         var9[2] = var8[3];
         var9[3] = var8[2];
         break;
      case 7:
         var8[1].a(var1.d() + (var3 + var6) / 2.0F);
         var8[0].a(var8[1].d() - var3);
         var8[2].a(var8[1].d() - var6);
         var8[3].a(var8[2].d() - var3);
         var8[0].b(var1.e() + var7 / 2.0F);
         var8[1].b(var8[0].e());
         var8[2].b(var8[1].e() - var7);
         var8[3].b(var8[2].e());
         var9[0] = var8[0];
         var9[1] = var8[1];
         var9[2] = var8[3];
         var9[3] = var8[2];
      }

      return var9;
   }

   static com.aspose.cells.b.a.b.zo[] d(zig var0) {
      com.aspose.cells.b.a.b.zo var1 = new com.aspose.cells.b.a.b.zo(var0.S().j(), var0.S().f());
      int var2 = var0.E() % 90;
      if (var2 >= 45) {
         var2 = 90 - var2;
      }

      int var5 = var0.E() / 45;
      float var3;
      float var4;
      switch(var5) {
      case 0:
      case 3:
      case 4:
      case 7:
      case 8:
         var3 = var0.S().g();
         var4 = var0.S().h();
         break;
      case 1:
      case 2:
      case 5:
      case 6:
      default:
         var3 = var0.S().h();
         var4 = var0.S().g();
      }

      float var6 = var4 * (float)Math.sin((double)var2 * 3.141592653589793D / 180.0D);
      float var7 = var4 * (float)Math.sin((double)var0.p() * 3.141592653589793D / 180.0D);
      com.aspose.cells.b.a.b.zo[] var8 = new com.aspose.cells.b.a.b.zo[4];
      com.aspose.cells.b.a.b.zo[] var9 = new com.aspose.cells.b.a.b.zo[2];
      zbuk.a(var8);
      zbuk.a(var9);
      switch(var5) {
      case 0:
      case 8:
         var8[0].a(var1.d() - (var3 + var6) / 2.0F);
         var8[1].a(var8[0].d() + var3);
         var8[2].a(var8[1].d() + var6);
         var8[3].a(var8[0].d() + var6);
         var8[0].b(var1.e() + var7 / 2.0F);
         var8[1].b(var8[0].e());
         var8[2].b(var8[1].e() - var7);
         var8[3].b(var8[2].e());
         var9[0] = var8[1];
         var9[1] = var8[2];
         break;
      case 1:
         var8[0].a(var1.d() - (var3 + var6) / 2.0F);
         var8[1].a(var8[0].d() + var6);
         var8[2].a(var8[1].d() + var3);
         var8[3].a(var8[0].d() + var3);
         var8[0].b(var1.e() - var7 / 2.0F);
         var8[1].b(var8[0].e() + var7);
         var8[2].b(var8[1].e());
         var8[3].b(var8[0].e());
         var9[0] = var8[1];
         var9[1] = var8[2];
         break;
      case 2:
         var8[1].a(var1.d() - (var3 + var6) / 2.0F);
         var8[0].a(var8[1].d() + var6);
         var8[2].a(var8[1].d() + var3);
         var8[3].a(var8[0].d() + var3);
         var8[0].b(var1.e() - var7 / 2.0F);
         var8[1].b(var8[0].e() + var7);
         var8[2].b(var8[1].e());
         var8[3].b(var8[0].e());
         var9[0] = var8[1];
         var9[1] = var8[2];
         break;
      case 3:
         var8[1].a(var1.d() - (var3 + var6) / 2.0F);
         var8[0].a(var8[1].d() + var3);
         var8[2].a(var8[1].d() + var6);
         var8[3].a(var8[2].d() + var3);
         var8[0].b(var1.e() - var7 / 2.0F);
         var8[1].b(var8[0].e());
         var8[2].b(var8[1].e() + var7);
         var8[3].b(var8[2].e());
         var9[0] = var8[1];
         var9[1] = var8[2];
         break;
      case 4:
         var8[0].a(var1.d() + (var3 + var6) / 2.0F);
         var8[1].a(var8[0].d() - var3);
         var8[2].a(var8[1].d() - var6);
         var8[3].a(var8[2].d() + var3);
         var8[0].b(var1.e() - var7 / 2.0F);
         var8[1].b(var8[0].e());
         var8[2].b(var8[1].e() + var7);
         var8[3].b(var8[2].e());
         var9[0] = var8[0];
         var9[1] = var8[3];
         break;
      case 5:
         var8[0].a(var1.d() + (var3 + var6) / 2.0F);
         var8[1].a(var8[0].d() - var6);
         var8[2].a(var8[1].d() - var3);
         var8[3].a(var8[0].d() - var3);
         var8[0].b(var1.e() + var7 / 2.0F);
         var8[1].b(var8[0].e() - var7);
         var8[2].b(var8[1].e());
         var8[3].b(var8[0].e());
         var9[0] = var8[0];
         var9[1] = var8[3];
         break;
      case 6:
         var8[1].a(var1.d() + (var3 + var6) / 2.0F);
         var8[0].a(var8[1].d() - var6);
         var8[2].a(var8[1].d() - var3);
         var8[3].a(var8[0].d() - var3);
         var8[0].b(var1.e() + var7 / 2.0F);
         var8[1].b(var8[0].e() - var7);
         var8[2].b(var8[1].e());
         var8[3].b(var8[0].e());
         var9[0] = var8[0];
         var9[1] = var8[3];
         break;
      case 7:
         var8[1].a(var1.d() + (var3 + var6) / 2.0F);
         var8[0].a(var8[1].d() - var3);
         var8[2].a(var8[1].d() - var6);
         var8[3].a(var8[2].d() - var3);
         var8[0].b(var1.e() + var7 / 2.0F);
         var8[1].b(var8[0].e());
         var8[2].b(var8[1].e() - var7);
         var8[3].b(var8[2].e());
         var9[0] = var8[0];
         var9[1] = var8[3];
      }

      return var9;
   }

   static com.aspose.cells.b.a.b.zo e(zig var0) {
      com.aspose.cells.b.a.b.zo var1 = new com.aspose.cells.b.a.b.zo(var0.S().j(), var0.S().f());
      int var2 = var0.E() % 90;
      if (var2 >= 45) {
         var2 = 90 - var2;
      }

      int var5 = var0.E() / 45;
      float var3;
      float var4;
      switch(var5) {
      case 0:
      case 3:
      case 4:
      case 7:
      case 8:
         var3 = var0.S().g();
         var4 = var0.S().h();
         break;
      case 1:
      case 2:
      case 5:
      case 6:
      default:
         var3 = var0.S().h();
         var4 = var0.S().g();
      }

      float var6 = var4 * (float)Math.sin((double)var2 * 3.141592653589793D / 180.0D);
      float var7 = var4 * (float)Math.sin((double)var0.p() * 3.141592653589793D / 180.0D);
      com.aspose.cells.b.a.b.zo[] var8 = new com.aspose.cells.b.a.b.zo[4];
      com.aspose.cells.b.a.b.zo var9 = com.aspose.cells.b.a.b.zo.a();
      zbuk.a(var8);
      switch(var5) {
      case 0:
      case 8:
         var8[0].a(var1.d() - (var3 + var6) / 2.0F);
         var8[1].a(var8[0].d() + var3);
         var8[2].a(var8[1].d() + var6);
         var8[3].a(var8[0].d() + var6);
         var8[0].b(var1.e() + var7 / 2.0F);
         var8[1].b(var8[0].e());
         var8[2].b(var8[1].e() - var7);
         var8[3].b(var8[2].e());
         var9 = var8[0];
         break;
      case 1:
         var8[0].a(var1.d() - (var3 + var6) / 2.0F);
         var8[1].a(var8[0].d() + var6);
         var8[2].a(var8[1].d() + var3);
         var8[3].a(var8[0].d() + var3);
         var8[0].b(var1.e() - var7 / 2.0F);
         var8[1].b(var8[0].e() + var7);
         var8[2].b(var8[1].e());
         var8[3].b(var8[0].e());
         var9 = var8[2];
         break;
      case 2:
         var8[1].a(var1.d() - (var3 + var6) / 2.0F);
         var8[0].a(var8[1].d() + var6);
         var8[2].a(var8[1].d() + var3);
         var8[3].a(var8[0].d() + var3);
         var8[0].b(var1.e() - var7 / 2.0F);
         var8[1].b(var8[0].e() + var7);
         var8[2].b(var8[1].e());
         var8[3].b(var8[0].e());
         var9 = var8[1];
         break;
      case 3:
         var8[1].a(var1.d() - (var3 + var6) / 2.0F);
         var8[0].a(var8[1].d() + var3);
         var8[2].a(var8[1].d() + var6);
         var8[3].a(var8[2].d() + var3);
         var8[0].b(var1.e() - var7 / 2.0F);
         var8[1].b(var8[0].e());
         var8[2].b(var8[1].e() + var7);
         var8[3].b(var8[2].e());
         var9 = var8[3];
         break;
      case 4:
         var8[0].a(var1.d() + (var3 + var6) / 2.0F);
         var8[1].a(var8[0].d() - var3);
         var8[2].a(var8[1].d() - var6);
         var8[3].a(var8[2].d() + var3);
         var8[0].b(var1.e() - var7 / 2.0F);
         var8[1].b(var8[0].e());
         var8[2].b(var8[1].e() + var7);
         var8[3].b(var8[2].e());
         var9 = var8[2];
         break;
      case 5:
         var8[0].a(var1.d() + (var3 + var6) / 2.0F);
         var8[1].a(var8[0].d() - var6);
         var8[2].a(var8[1].d() - var3);
         var8[3].a(var8[0].d() - var3);
         var8[0].b(var1.e() + var7 / 2.0F);
         var8[1].b(var8[0].e() - var7);
         var8[2].b(var8[1].e());
         var8[3].b(var8[0].e());
         var9 = var8[0];
         break;
      case 6:
         var8[1].a(var1.d() + (var3 + var6) / 2.0F);
         var8[0].a(var8[1].d() - var6);
         var8[2].a(var8[1].d() - var3);
         var8[3].a(var8[0].d() - var3);
         var8[0].b(var1.e() + var7 / 2.0F);
         var8[1].b(var8[0].e() - var7);
         var8[2].b(var8[1].e());
         var8[3].b(var8[0].e());
         var9 = var8[3];
         break;
      case 7:
         var8[1].a(var1.d() + (var3 + var6) / 2.0F);
         var8[0].a(var8[1].d() - var3);
         var8[2].a(var8[1].d() - var6);
         var8[3].a(var8[2].d() - var3);
         var8[0].b(var1.e() + var7 / 2.0F);
         var8[1].b(var8[0].e());
         var8[2].b(var8[1].e() - var7);
         var8[3].b(var8[2].e());
         var9 = var8[1];
      }

      return var9;
   }

   private static void a(zig var0, zn var1, zbp var2) throws Exception {
      if (!var0.B().E()) {
         var2.S().m();
      }
   }

   private static int a(zig var0, com.aspose.cells.b.a.b.zs var1) {
      int var2 = var0.E() % 90;
      if (var2 >= 45) {
         var2 = 90 - var2;
      }

      int var5 = var0.E() / 45;
      int var3;
      int var4;
      switch(var5) {
      case 0:
      case 3:
      case 4:
      case 7:
      case 8:
         var3 = var1.b();
         var4 = var1.c();
         break;
      case 1:
      case 2:
      case 5:
      case 6:
      default:
         var3 = var1.c();
         var4 = var1.b();
      }

      int var6 = (int)((double)var4 * Math.sin((double)var2 * 3.141592653589793D / 180.0D));
      return var3 + var6;
   }

   private static void a(zn var0, zbp var1, com.aspose.cells.b.a.b.zp var2, com.aspose.cells.b.a.b.zp[] var3, boolean var4) {
      boolean var5 = var4;
      com.aspose.cells.b.a.b.zs var6 = com.aspose.cells.b.a.b.zs.a();
      zig var7 = var1.e();
      if (var1.g() == 1) {
         var4 = !var4;
      }

      int var10;
      if (var4) {
         com.aspose.cells.b.a.b.zt var8 = new com.aspose.cells.b.a.b.zt((float)var3[0].e() * 0.8F, (float)var3[0].f() * 0.8F);
         var6 = var1.S().a(var8);
         var1.S().e().b.a(var6);
         com.aspose.cells.b.a.b.zo var9 = e(var7);
         if (var9.d() < var7.S().j()) {
            var10 = (int)(var9.d() - (float)var2.c());
            if (var10 < var6.b()) {
               var3[0].a(var3[0].c() + var6.b());
               var3[0].c(var3[0].e() - var6.b());
            }
         } else {
            var10 = (int)((float)var3[0].i() - var9.d());
            if (var10 < var6.b()) {
               var1.S().e().b.a(var3[0].i() - var6.b());
               var1.S().e().b.b(var3[0].d() + (var3[0].f() - var6.c()) / 2);
               var3[0].c(var3[0].e() - var6.b());
            }
         }

         zvr.a(var7, var3[0], var4);
      } else {
         com.aspose.cells.b.a.b.zo[] var12 = c(var7);
         com.aspose.cells.b.a.b.zt var13;
         if (var7.p() == 0) {
            var13 = new com.aspose.cells.b.a.b.zt((float)var3[0].e() * 0.8F, (float)var3[0].f() * 0.7F);
            var6 = var1.S().a(var13);
            var1.S().e().b.a(var6);
            var1.S().e().b.b(var3[0].j() - var6.c() - c);
            var10 = var3[0].j() - (int)var12[0].e();
            if (var10 < var6.c() + c) {
               var3[0].d(var3[0].f() - (var6.c() + c - var10));
            }
         } else if (var7.p() > 0) {
            if (var12[0].e() == var12[1].e()) {
               var13 = new com.aspose.cells.b.a.b.zt((float)var3[0].e() * 0.8F, (float)var3[0].f() * 0.7F);
               var6 = var1.S().a(var13);
               var1.S().e().b.a(var6);
               boolean var14 = false;
               if (var5) {
                  var1.S().e().b.b(var3[0].j() - var6.c() - c);
               } else {
                  var1.S().e().b.b(var2.j() - var6.c() - c * 4);
               }

               var10 = var3[0].j() - (int)var12[0].e();
               if (var10 < var6.c() + c) {
                  var3[0].d(var3[0].f() - (var6.c() + c - var10));
               }
            } else {
               var13 = new com.aspose.cells.b.a.b.zt((float)var3[0].e() * 0.3F, (float)var3[0].f() * 0.3F);
               var6 = var1.S().a(var13);
               var1.S().e().b.a(var6);
               var10 = var7.E() / 45;
               int var11;
               switch(var10) {
               case 1:
               case 5:
                  if ((int)Math.abs(var12[0].d() + var12[1].d()) / 2 - var3[0].c() < var6.b()) {
                     var11 = var6.b() - ((int)Math.abs(var12[0].d() + var12[1].d()) / 2 - var3[0].c());
                     var3[0].a(var3[0].c() + var11);
                     var3[0].c(var3[0].e() - var11);
                  }
                  break;
               case 2:
               case 6:
                  if (var3[0].i() - (int)Math.abs(var12[0].d() + var12[1].d()) / 2 < var6.b()) {
                     var11 = var6.b() - (var3[0].i() - (int)Math.abs(var12[0].d() + var12[1].d()) / 2);
                     var3[0].c(var3[0].e() - var11);
                  }
               case 3:
               case 4:
               }

               if (var3[0].j() - (int)Math.abs(var12[0].e() + var12[1].e()) / 2 < var6.c()) {
                  var3[0].d(var3[0].f() - (var6.c() + c - (var3[0].j() - (int)Math.abs(var12[0].e() + var12[1].e()) / 2)));
               }
            }
         }

         zvr.a(var7, var3[0], var4);
      }

   }

   private static void a(zn var0, zbp var1, com.aspose.cells.b.a.b.zp[] var2) {
      if (!zbuk.a(var2[0])) {
         com.aspose.cells.b.a.b.zs var3 = com.aspose.cells.b.a.b.zs.a();
         zig var4 = var1.e();
         com.aspose.cells.b.a.b.zo[] var5 = d(var4);
         com.aspose.cells.b.a.b.zt var6;
         int var7;
         if (var4.p() == 0) {
            var6 = new com.aspose.cells.b.a.b.zt((float)var2[0].e() * 0.8F, (float)var2[0].f() * 0.7F);
            var3 = var1.S().a(var6);
            var1.S().e().b.a(var3);
            var1.S().e().b.b(var2[0].j() - var3.c() - c);
            if (!var4.B().s() && var4.D()) {
               var7 = var2[0].j() - (int)var5[0].e();
               if (var7 < var3.c() + c) {
                  var2[0].d(var2[0].f() + var3.c() + c - var7);
               }
            } else {
               var7 = var2[0].j() - (int)var5[0].e();
               if (var7 < var3.c() + c) {
                  var2[0].d(var2[0].f() - (var3.c() + c - var7));
               }
            }
         }

         if (var4.p() > 0) {
            if (var5[0].e() == var5[1].e()) {
               var6 = new com.aspose.cells.b.a.b.zt((float)var2[0].e() * 0.8F, (float)var2[0].f() * 0.7F);
               var3 = var1.S().a(var6);
               var1.S().e().b.a(var3);
               boolean var9 = false;
               var1.S().e().b.b(var2[0].j() - var3.c() - c);
               if (!var4.B().s() && var4.D()) {
                  var7 = var2[0].j() - (int)var5[0].e();
                  if (var7 < var3.c() + c) {
                     var2[0].d(var2[0].f() + var3.c() + c - var7);
                  }
               } else {
                  var7 = var2[0].j() - (int)var5[0].e();
                  if (var7 < var3.c() + c) {
                     var2[0].d(var2[0].f() - (var3.c() + c - var7));
                  }
               }
            } else {
               var6 = new com.aspose.cells.b.a.b.zt((float)var2[0].e() * 0.3F, (float)var2[0].f() * 0.3F);
               var3 = var1.S().a(var6);
               var1.S().e().b.a(var3);
               var7 = var4.E() / 45;
               int var8;
               switch(var7) {
               case 0:
               case 4:
               case 8:
                  if (var2[0].i() - (int)Math.abs(var5[0].d() + var5[1].d()) / 2 < var3.b()) {
                     var8 = var3.b() - (var2[0].i() - (int)Math.abs(var5[0].d() + var5[1].d()) / 2);
                     if (!var4.B().s() && var4.D()) {
                        var2[0].c(var2[0].e() + var8);
                     } else {
                        var2[0].c(var2[0].e() - var8);
                     }
                  }
               case 1:
               case 2:
               case 5:
               case 6:
               default:
                  break;
               case 3:
               case 7:
                  if ((int)Math.abs(var5[0].d() + var5[1].d()) / 2 - var2[0].c() < var3.b()) {
                     var8 = var3.b() - ((int)Math.abs(var5[0].d() + var5[1].d()) / 2 - var2[0].c());
                     if (!var4.B().s() && var4.D()) {
                        var2[0].a(var2[0].c() - var8);
                        var2[0].c(var2[0].e() + var8);
                     } else {
                        var2[0].a(var2[0].c() + var8);
                        var2[0].c(var2[0].e() - var8);
                     }
                  }
               }

               if (var2[0].j() - (int)Math.abs(var5[0].e() + var5[1].e()) / 2 < var3.c()) {
                  if (!var4.B().s() && var4.D()) {
                     var2[0].d(var2[0].f() + var3.c() + c - (var2[0].j() - (int)Math.abs(var5[0].e() + var5[1].e()) / 2));
                  } else {
                     var2[0].d(var2[0].f() - (var3.c() + c - (var2[0].j() - (int)Math.abs(var5[0].e() + var5[1].e()) / 2)));
                  }
               }
            }

            if (var4.B().s() || !var4.D()) {
               zvr.a(var4, var2[0], false);
            }
         } else {
            var1.S().a("");
         }

      }
   }

   private static void a(zbp var0, com.aspose.cells.b.a.b.zp var1, boolean var2, com.aspose.cells.b.a.b.zs var3, com.aspose.cells.b.a.b.zs var4, int var5) {
      boolean var6 = var2;
      com.aspose.cells.b.a.b.zs var7 = com.aspose.cells.b.a.b.zs.a();
      zig var8 = var0.e();
      if (var0.g() == 1) {
         var7 = var3;
         var6 = !var2;
      } else {
         var7 = var4;
         if (var0.I() != 3) {
            var4.a(var4.b() + var5);
         }
      }

      if (var6) {
         com.aspose.cells.b.a.b.zs var9 = var0.S().e().b.b();
         com.aspose.cells.b.a.b.zo var10 = e(var8);
         if (var10.d() < var8.S().j()) {
            var0.S().e().b.a(var0.I() == 3 ? (int)(var10.d() - (float)var9.b()) : (int)(var10.d() - (float)var7.b() - (float)var9.b()));
            var0.S().e().b.b((int)(var10.e() - var8.S().i() / 2.0F - (float)(var9.c() / 2)));
         } else {
            int var11 = (int)((float)var1.i() - var10.d());
            if (var11 >= var9.b()) {
               var0.S().e().b.a(var0.I() == 3 ? (int)var10.d() : (int)(var10.d() + (float)var7.b()));
               var0.S().e().b.b((int)(var10.e() - var8.S().i() / 2.0F - (float)(var9.c() / 2)));
            }
         }
      } else {
         com.aspose.cells.b.a.b.zo[] var12 = c(var8);
         if (var12[0].e() == var12[1].e()) {
            if (var8.p() >= 0) {
               var0.S().e().b.a((int)((var12[0].d() + var12[1].d()) / 2.0F - (float)(var0.S().e().b.e() / 2)));
            }
         } else {
            if (var12[0].d() >= var12[1].d()) {
               var12[1].d();
            } else {
               var12[0].d();
            }

            if (var12[0].d() >= var12[1].d()) {
               var12[0].d();
            } else {
               var12[1].d();
            }

            if ((var8.E() < 45 || var8.E() >= 90) && (var8.E() < 225 || var8.E() >= 270)) {
               var0.S().e().b.a((int)(Math.abs(var12[0].d() + var12[1].d()) / 2.0F + (float)a(var8, var7)));
            } else {
               var0.S().e().b.a((int)(Math.abs(var12[0].d() + var12[1].d()) / 2.0F - (float)var0.S().e().b.e() - (float)a(var8, var7)));
            }

            var0.S().e().b.b((int)(Math.abs(var12[0].e() + var12[1].e()) / 2.0F));
         }
      }

   }

   private static void g(zig var0) {
      zbp var1 = var0.K();
      ArrayList var2 = var0.K().l;
      ArrayList var3 = var0.z().j();

      for(int var4 = 0; var4 < var3.size(); ++var4) {
         zbcq var5 = (zbcq)var3.get(var4);
         com.aspose.cells.b.a.a.ze.a(var2, (Object)var5.C());
      }

      var1.f(0.0D);
      var1.d((double)var3.size());
      var1.c((double)var1.Q());
      var1.e(var1.x() / 2.0D);
   }

   private static void h(zig var0) {
      if (var0.N() == 4 || var0.N() == 5) {
         var0.e(20);
      }

   }
}
